﻿Public Class perOutrasDespesasProposta
    Inherits perAcessoBD

    Public Sub inserirOutrasDespesasProposta(ByVal iCodProposta As Int32, ByVal iRevProposta As Int32, ByVal iCodDespesa As Int32,
                                             ByVal dValor As Decimal, ByVal bGerarReceita As Boolean, ByVal dValorReceita As Decimal)
        Dim sSql As String

        sSql = "INSERT INTO proposta_outrasDespesas" & Environment.NewLine &
               "           (codProposta" & Environment.NewLine &
               "           ,revProposta" & Environment.NewLine &
               "           ,codDespesa" & Environment.NewLine &
               "           ,valor" & Environment.NewLine &
               "           ,gerarReceita" & Environment.NewLine &
               "           ,valorReceita)" & Environment.NewLine &
               "        VALUES" & Environment.NewLine &
               "           (@codProposta" & Environment.NewLine &
               "           ,@revProposta" & Environment.NewLine &
               "           ,@codDespesa" & Environment.NewLine &
               "           ,@valor" & Environment.NewLine &
               "           ,@gerarReceita" & Environment.NewLine &
               "           ,@valorReceita)"

        With MyBase.SQLCmd.Parameters
            .Clear()
            .AddWithValue("@CodProposta", iCodProposta)
            .AddWithValue("@revProposta", iRevProposta)
            .AddWithValue("@codDespesa", iCodDespesa)
            .AddWithValue("@valor", dValor)
            .AddWithValue("@gerarReceita", bGerarReceita)
            .AddWithValue("@valorReceita", dValorReceita)
        End With

        MyBase.executarAcao(sSql)

    End Sub
End Class
